<template>
  <div class="component-right">
    <component
      v-if="showPageSetting"
      :settingValue="pageConfig"
      :is="'pageSetting'">
    </component>
    <component
      v-else
      :settingValue="activeElement.defaultAttr"
      :is="activeElement.elName + 'Setting'">
    </component>
  </div>

</template>
<script>
  import attrComponents from './index.js'
  import {mapGetters} from 'vuex'


  export default {
    name: 'attrConfigure',
    components: {
      ...attrComponents
    },
    data() {
      return {}
    },
    computed: {
      ...mapGetters(['activeElement', 'pageConfig', 'showPageSetting']),
    },
  }
</script>

<style scoped lang="scss">
  .component-right {
    width: 360px;
    min-width: 360px;
    background-color: #fff;
  }
</style>
